<h1>Listing flights</h1>

<table>
  <tr>
    <th>Departure</th>
    <th>Arrival</th>
    <th>Destination</th>
    <th>Baggage allowance</th>
    <th>Capacity</th>
  </tr>

<% for flight in @flights %>
  <tr>
    <td><%=h flight.departure %></td>
    <td><%=h flight.arrival %></td>
    <td><%=h flight.destination %></td>
    <td><%=h flight.baggage_allowance %></td>
    <td><%=h flight.capacity %></td>
    <td><%= link_to 'Show', flight %></td>
    <td><%= link_to 'Edit', edit_flight_path(flight) %></td>
    <td><%= link_to 'Destroy', flight, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New flight', new_flight_path %>
